<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:s="http://jboss.com/products/seam/taglib"
        xmlns:rich="http://richfaces.org/rich"
        xmlns:a4j="http://richfaces.org/a4j">

		<h:outputText value="#{p_text}" rendered="#{p_text.length() le p_len}"/>

		<rich:togglePanel stateOrder="closed,opened" switchType="client" rendered="#{p_text.length() > p_len}">
	 	<f:facet name="closed">
	 		<rich:toggleControl value="#{UString.crop(p_text, p_len)}..#{messages['py.org.atom.pagination.next']}#{messages['py.org.atom.pagination.next']}"/>
	 	</f:facet>
	 	<f:facet name="opened">
	 	<f:subview>
			<h:outputText value="#{p_text}" /> 
			<rich:toggleControl value="#{messages['py.org.atom.pagination.previous']}#{messages['py.org.atom.pagination.previous']}" switchToState="closed" />
	 	</f:subview>
	 	</f:facet>	
		</rich:togglePanel>
    										
</ui:composition>